import {defineStore} from "pinia";
export const useCountStore = defineStore('count',{
    // actions里面放置的是一个一个方法，用于响应组件中的动作
    actions: {
      increment(val:number) {
          this.sum += val
      }
    },
    state() {
        return {
            sum: 6,
            school: '上古骨'
        }
    },
    getters: {
        bigSum(state) {
            return state.sum * 10
        },
        upperSchool():string {
            return this.school.toUpperCase()
        },
        getAddress:(state)=> state.school.toUpperCase()
    }
})
